<!DOCTYPE html>
<html lang="en" th:replace="~{layout.html::layout(~{:: #content})}" xmlns:th="http://www.thymeleaf.org">
<body>

<div id="content">
    <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
            <ul class="nav nav-sidebar">
                <li><a href="index">借阅信息</a></li>
                <li><a href="students">学生列表</a></li>
                <li class="active"><a href="books">书籍列表</a></li>
            </ul>

        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <h2 class="sub-header">修改书籍数量</h2>
            <p th:if="${warning}" style="color: red">书籍数量不能为空</p>
            <form class="form-inline" method="post" action="modify-book-number">
                <div class="form-group">
                    <label for="bookName">书籍名称</label>
                    <select id="bookName" class="form-control" name="bookId">
                        <option th:each="book:${books}" th:text="${book.getName()}" th:value="${book.getId()}"></option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="bookNumber">数量</label>
                    <input name="bookNumber" type="text" class="form-control" id="bookNumber"
                           placeholder="3">
                </div>
                <button type="submit" class="btn btn-default">添加修改</button>
            </form>
        </div>
    </div>
</div>

</body>
</html>